from celery import Celery
import celery_task.config


celery_app = Celery('wechat')

# 2.加载celery的配置信息
celery_app.config_from_object(celery_task.config)

# 3.指定celery可以生产什么任务
celery_app.autodiscover_tasks(['celery_task.email'])


if __name__ == '__main__':
    celery_app.start(argv=['celery', 'worker', '-l', 'info', '-f', 'celery.log'])






